package com.atguigu.educms.controller;

import com.atguigu.commonutils.R;
import com.atguigu.educms.entity.CrmBanner;
import com.atguigu.educms.service.CrmBannerService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/educms/bannerfront")
public class IndexBannerController {
    @Autowired
    private CrmBannerService bannerService;

    //分页查询banner
    @GetMapping("getAllBanner")
    public R getAllBanner(){
      List<CrmBanner> list= bannerService.selectAllBanner();
        return R.ok().data("list",list);
    }


}
